Skip to content

Support ORCA1 and ORCA12 bathymetry in regrid_bathymetry and add resample_grid function#175

Open
taimoorsohail wants to merge 11 commits intomainfrom
ts/regrid-ORCA-bathymetry
Open

Support ORCA1 and ORCA12 bathymetry in regrid_bathymetry and add resample_grid function#175
taimoorsohail wants to merge 11 commits intomainfrom
ts/regrid-ORCA-bathymetry

Conversation

@taimoorsohail
Copy link
Copy Markdown
Collaborator

@taimoorsohail taimoorsohail commented Apr 21, 2026

This PR supports ORCA bathymetry files in regrid_bathymetry to benefit from the manual tweaking of the ORCA files. We have also implemented a rescale_grid function which takes the ORCA12 or ORCA1 grids and up- or downscales the grid. The scaling is done via resampling in I,j space, ensuring grid topology is conserved when going from, for example 12-degree to 6-degree.

With the above changes - the following workflow will be supported:

Nz = Integer(75)
depth = -5500.0 # Depth of the ocean in meters
z_faces = ExponentialDiscretization(Nz, depth, 0, mutable=true)
south_rows_to_remove = 43
grid_12deg = ORCAGrid(arch; dataset=ORCA12(), Nz, z=z_faces, halo=(4, 4, 4), south_rows_to_remove, dir = data_path)

underlying_grid = resample_grid(grid_12deg; size=(360*6, 180*6))

ORCA12metadata = Metadatum(:bottom_height, dataset=ORCA12(), dir = data_path)

bottom_height = regrid_bathymetry(underlying_grid, ORCA12metadata;
                                minimum_depth = 15,
                                interpolation_passes = 25,
                                major_basins = 4)

grid = ImmersedBoundaryGrid(underlying_grid, GridFittedBottom(bottom_height); active_cells_map=true)

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

❌ Patch coverage is 0% with 330 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/Bathymetry/orca_grid.jl 0.00% 300 Missing ⚠️
src/DataWrangling/ORCA/ORCA.jl 0.00% 25 Missing ⚠️
src/Bathymetry/regrid_bathymetry.jl 0.00% 5 Missing ⚠️

📢 Thoughts on this report? Let us know!

@taimoorsohail taimoorsohail changed the title Support ORCA1 and ORCA12 bathymetry in regrid_bathymetry and add rescale_grid function Support ORCA1 and ORCA12 bathymetry in regrid_bathymetry and add resample_grid function Apr 21, 2026
@taimoorsohail taimoorsohail changed the base branch from main to ts/implement-ORCA12 April 21, 2026 05:29
Base automatically changed from ts/implement-ORCA12 to main April 23, 2026 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant